package com.apimanage.common.exception;

/**
 * API异常类
 *
 * @author API管理平台
 */
public class ApiException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    
    /**
     * 错误码
     */
    private Integer code;
    
    /**
     * 错误消息
     */
    private String message;
    
    public ApiException(Integer code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }
    
    public ApiException(String message) {
        this(500, message);
    }
    
    // 手动添加getter方法，不依赖Lombok
    public Integer getCode() {
        return code;
    }
    
    public String getMessage() {
        return message;
    }
}